﻿using NicoView.Model.Share.Speech;
using NicoView.Model.Share.Speech.Learn;
using NicoView.Model.Speech;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace NicoView.Model.Platform.Speachers.Bouyomichan
{
    public sealed class BouyomichanProvider:SpeacherProviderBase
    {
        public BouyomichanProvider()
        {
            _instance = null;
            Group = "棒読みちゃん";
        }

        public override string Name
        {
            get { return "棒読みちゃん"; }
        }

        private ISpeacher _instance;

        public override ISpeacher GetInstance()
        {
            if (_instance == null) _instance = new BouyomichanSpeacher(Name, RegexLearnDictionary,LearnDictionary);
            return _instance;

        }

        private static  RegexLearnDictionary RegexLearnDictionary;

        private static LearnDictionary LearnDictionary;

        public static ICollection<SpeacherProviderBase> GetInstalledProvider(RegexLearnDictionary regexDic, LearnDictionary dic)
        {
            RegexLearnDictionary = regexDic;
            LearnDictionary = dic;
            var rslt = new List<SpeacherProviderBase>();
            rslt.Add(new BouyomichanProvider());
            return rslt;

        }

        public override SpeacherProviderBase Copy()
        {
            return new BouyomichanProvider();
        }
    }
}
